package com.niiwoo.civet.scheduler.trigger;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import com.alibaba.dubbo.config.annotation.Reference;
import com.niiwoo.civet.trade.service.loan.LoanTimedTaskDubboService;

import lombok.extern.slf4j.Slf4j;

/**
 * 借款流程异常定时任务
 * 
 * Created by zhoulinquan on 2018/4/24.
 */
@Component
@Slf4j
public class LoanFlowExceptionRetryJobTrigger {

    @Reference(version = "1.0.0")
    private LoanTimedTaskDubboService loanTimedTaskDubboService;

    @Scheduled(cron = "${loan.exception_retry}")
    public void loanFlowExceptionRetry(){
        log.info("V5.1.5 借款流程异常重试");
        loanTimedTaskDubboService.loanFlowExceptionRetry();
    }
    
    @Scheduled(cron = "${loan.active_repair}")
    public void activeQueryTianchengResult(){
        log.info("V5.1.5 主动查询天秤结果");
        loanTimedTaskDubboService.activeQueryTianchengResult();
    }
}
